﻿<local:DocumentBase x:Class="WPFExcelReport.ArticleTechnic"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
          xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
        Loaded="Window_Loaded"
                      Title="ArticleConditions"
                    >
    <local:DocumentBase.Resources>
   </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*"></ColumnDefinition>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Vertical">
            <WrapPanel  Name="zoneCommand" Height="34" Margin="0,0,0,6">
                <Label Content="系统"    Width="40" Margin="0,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="0,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18"/>
                <Label Content="语言"    Width="40" Margin="0,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <TextBox  IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1"  HorizontalAlignment="Left" Background="Pink" FontSize="18"/>
                <Label Content="用户名" 
                                   Width="60" Margin="10,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <TextBox Name="txtUserID"  Width="80" Margin="10,0,0,0" Text=""  HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="True" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0"
                                     />
                <Label Content="密码"    Width="40" Margin="10,0,0,0"   HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" />
                <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0"   HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                <Button  Content="登录验证" Height="34" Margin="10,0,0,0"  Name="btnLogIn" Width="75" Click="btnLogIn_Click"  KeyboardNavigation.TabIndex="2"
                                     IsDefault="True"
                                     />
            </WrapPanel>
            <WrapPanel>
                <Button Content="生成报表" Height="23" Margin="0,0,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <TextBlock FontSize="14"  Height="40"   Width="200" Name="txtArticleNum" Margin="30,10,0,0" Text="请选择品种" />
                <TextBlock  FontSize="14" Height="40"    Width="80" Name="txtArticleVar"   Margin="30,10,0,0"    Text="" />
                <TextBlock  FontSize="14" Height="40"    Width="80" Name="txtColor"  Margin="30,10,0,0"  Text="" />
                <TextBlock  FontSize="14" Height="40"    Width="80" Name="txtFinish"  Margin="30,10,0,0" Text="" />
            </WrapPanel>
        </StackPanel>
        <fd:FilteringDataGrid  Grid.Row="1" Grid.Column="0"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
                                                 EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
            AutoGenerateColumns="False"   

                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible" 
                               Margin="0,0,0,0"  
                                       ItemsSource="{Binding Path=ARTICLE}" 
                        x:Name="wAFARBENDataGrid" 
            SelectionChanged="wAFARBENDataGrid_SelectionChanged" 
                             >
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="品种" Binding="{Binding ARTNUM}"/>
                <DataGridTextColumn Header="版本" Binding="{Binding ARTVAR}"/>
                <DataGridTextColumn Header="描述" Binding="{Binding ARTDES}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <Grid Grid.Row="1" Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <fd:FilteringDataGrid  Grid.Row="0" Grid.Column="0"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ARTICLECOLOR}" 
                               Margin="0,0,0,0" 
                               x:Name="listColor" 
                                  SelectionChanged="listColor_SelectionChanged"
                             >
                <fd:FilteringDataGrid.Columns>
                    <DataGridTextColumn Header="品种" Binding="{Binding ARTNUM}"/>
                    <DataGridTextColumn Header="版本" Binding="{Binding ARTVAR}"/>
                    <DataGridTextColumn Header="色号" Binding="{Binding ARTCOLOR}"/>
                    <DataGridTextColumn Header="描述" Binding="{Binding COLORDES}"/>
                </fd:FilteringDataGrid.Columns>
            </fd:FilteringDataGrid  >
            <fd:FilteringDataGrid  Grid.Row="1" Grid.Column="0"
                             CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  RowDetailsVisibilityMode="VisibleWhenSelected"  
                               Height="Auto" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                                    IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding Path=ARTICLEFINISH}" 
                               Margin="0,0,0,0" 
                               x:Name="listFinish" 
                                   SelectionChanged="listFinish_SelectionChanged"
                             >
                <fd:FilteringDataGrid.Columns>
                    <DataGridTextColumn Header="后整理" Binding="{Binding ARTFIN}"/>
                    <DataGridTextColumn Header="描述" Binding="{Binding FINISHDES}"/>
                </fd:FilteringDataGrid.Columns>
            </fd:FilteringDataGrid  >
        </Grid>
        <TextBox  Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
            Height="40" Margin="0,0,0,0" Name="textBox1" Width="Auto" HorizontalAlignment="Stretch" />
    </Grid>
</local:DocumentBase>
